import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects


ApplicationWindow {
    width: rootWidth
    height: rootHeight
    visible: true

    // visibility:"Windowed"   // 全屏显示应用程序
    visibility:"FullScreen"   // 全屏显示应用程序

    //显示到副屏
    x: Qt.application.screens[1].virtualX
    y: Qt.application.screens[1].virtualY

    property real rootWidth: Screen.width
    property real rootHeight: Screen.height

    // 当前页码
    property int currentPage: 0


    onCurrentPageChanged: {
        console.log("当前页码: " + currentPage)
    }

    Component.onCompleted: {
        currentPage = 5
        mainLoader.source = "IO_MonitorWindow.qml"
    }

    Item{
        id: rootItem
        anchors.fill: parent
    }

    Top_Window_Step{        // 顶部导航栏

    }

    MainNavigationBar{      // 侧面导航栏
        anchors.top: rootItem.top
        anchors.topMargin: 95
    }

    Loader{
        id: mainLoader
        anchors.top: rootItem.top
        anchors.topMargin: 95
        anchors.left: rootItem.left
        anchors.leftMargin: 95
        onSourceChanged: {
            console.log("已加载: "+ source)
        }

    }

    // A_Canvas{       // 自制简易图形显示画布
    //     anchors.top: rootItem.top
    //     anchors.topMargin: 95
    //     anchors.left: rootItem.left
    //     anchors.leftMargin: 95
    // }

    // A_Button{
    //     anchors.top: rootItem.top
    //     anchors.topMargin: 500
    //     anchors.left: rootItem.left
    //     anchors.leftMargin: 95
    //     isSelected: true
    // }

}
